package IO流;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;

public class 单写 {
    public static void main(String[] args) throws IOException {
        String src="C:\\Users\\User\\Desktop\\22.txt";
        RandomAccessFile orandomAccessFile = new RandomAccessFile(src,"rw");
        orandomAccessFile.seek(400);
        orandomAccessFile.writeInt(100);
        orandomAccessFile.seek(300);
        orandomAccessFile.writeInt(99);
        orandomAccessFile.seek(200);
        orandomAccessFile.writeInt(98);
        orandomAccessFile.seek(100);
        orandomAccessFile.writeInt(97);
    }
}
